<!DOCTYPE html>
<html lang="en" class="search-page">
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<!-- <meta name="viewport" content="target-densitydpi=device-dpi,width=750,user-scalable=no" /> -->
	<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no" />
	<title>心灵影院</title>
	<meta http-equiv="cleartype" content="on">
    <meta name="apple-mobile-web-app-title" content="...">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta http-equiv="x-rim-auto-match" content="none">
    <meta name="apple-touch-fullscreen" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
	<!-- windows phone 点击无高光 -->
	<meta name="msapplication-tap-highlight" content="no">
	<link rel="stylesheet" type="text/css" href="/css/base.css" />
	<script type="text/javascript" src="/js/mobile/lib/jquery-1.10.1.min.js"></script>
</head>
<body>
	<div class="main">
		<!-- page-search -->
		<div class="page-search">
			<!-- page-search title -->
			<div class="page-title">
				<div class="icon c-back" onclick="window.history.back(-1)"></div>
				<div class="search-box">
					<div class="clear-text" onclick="$('#searchText').val('');"></div>
					<input type="text" name="" class="search-value" id="searchText"
						   placeholder="搜索你要找的影评或影片名称" />
				</div>
				<a class="search-btn" onclick="SearchVideos()">确定</a>
			</div>
			<!-- page-search container -->
			<div class="search-container">
				<!-- 搜索历史 -->
				<div class="sc-recommend">
					<!-- 搜索历史title -->
					<div class="recommend-title">
						<i class="title">热门搜索</i>
						<!--<i class="icon delete-history"></i>-->
					</div>
					<!-- 搜索历史 tag -->
					<div class="recommend-c" id="div_hotsearch">
						<span class="recommend-tag">鬼吹灯</span>
						<span class="recommend-tag">生化危机：终章</span>
						<span class="recommend-tag">速度与激情8</span>
						<span class="recommend-tag">金刚狼3：殊死一战</span>
						<span class="recommend-tag">极限特工</span>
						<span class="recommend-tag">守护者：世纪战元</span>
					</div>
				</div>
				<!-- 搜索结果列表 -->
				<div class="search-result" id="ul_comment">
					
					<!--<span class="sr-list">-->
						<!--<span class="list-img"></span>-->
						<!--<span class="list-info">-->
							<!--<div class="info-title">180°以南</div>-->
							<!--<div class="info-des">-->
								<!--美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。-->
							<!--</div>-->
							<!--<div class="play-btn">马上观看</div>-->
						<!--</span>-->
					<!--</span>-->
					<!--<span class="sr-list">-->
						<!--<span class="list-img"></span>-->
						<!--<span class="list-info">-->
							<!--<div class="info-title">180°以南</div>-->
							<!--<div class="info-des">-->
								<!--美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。-->
							<!--</div>-->
							<!--<div class="play-btn">马上观看</div>-->
						<!--</span>-->
					<!--</span>-->
					<!--<span class="sr-list">-->
						<!--<span class="list-img"></span>-->
						<!--<span class="list-info">-->
							<!--<div class="info-title">180°以南</div>-->
							<!--<div class="info-des">-->
								<!--美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。-->
							<!--</div>-->
							<!--<div class="play-btn">马上观看</div>-->
						<!--</span>-->
					<!--</span>-->
					<!--<span class="sr-list">-->
						<!--<span class="list-img"></span>-->
						<!--<span class="list-info">-->
							<!--<div class="info-title">180°以南</div>-->
							<!--<div class="info-des">-->
								<!--美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。美国的冒险家杰夫·约翰逊，驾船环绕半个地球，尝试攀登上科罗纳多巅峰。-->
							<!--</div>-->
							<!--<div class="play-btn">马上观看</div>-->
						<!--</span>-->
					<!--</span>-->
				</div>
				<div class="search-result" id="div_commentfoot">

				</div>
			</div>
		</div>
	</div>
	<script type="text/javascript" src="/js/mobile/search.js"></script>
	<script type='text/javascript' src='/js/mobile/mobilecom.js' charset='utf-8'></script>

	<script>
        LoadHotSearch();
        function  LoadHotSearch() {
            $.ajax({
                type: 'get',
                url:
                '/api/keyword/getkeywordlist?count=10',
                dataType: 'json',
                success: function(data){
                    if (mortise_layout.ValidataResult(data)) {
                        //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                        var videoList = data.result;
                        if (videoList && videoList.length > 0) {
                            var _html = '';
                            $.each(videoList,function(index,item){

                                _html+='<span class="recommend-tag" onclick="ClickKeyword(\''+item.fKeyword+'\')">'+item.fKeyword+'</span>';
                            });
                            $('#div_hotsearch').html(_html);
                        }
                        else{
                            $('#div_hotsearch').html('没有数据了！');
                        }

                    }
                }
            });

        }

        var filmObject = {
            pno: 1,
            pagesize: 6,
            allcount: -1,
            text:''
        }
        function ClickKeyword(text) {
            filmObject.pno=1;
            $('#searchText').val(text)
            filmObject.text=text;
            LoadSearchVideos();
        }

        function SearchVideos() {
            var text=$('#searchText').val();
            if (!text){

                return;
            }
            filmObject.pno=1;
            filmObject.text=text;
            LoadSearchVideos();
        }
        function  LoadSearchVideos() {

            $('#div_commentfoot').html('');

            $.ajax({
                type: 'get',
                url:
                '/api/film/getfilmlist?name='+filmObject.text+'&filmtype=&pno='+filmObject.pno+'&pagesize=' +
                ''+filmObject.pagesize+'&allcount=-1',
                dataType: 'json',
                success: function(data){
                    if (mortise_layout.ValidataResult(data)) {
                        //{"code":"OperateOk","errorMsg":"","result":{"list":[{"fId":"594cabc05bc42d07a0aa541a","fName":"一个钓鱼的故事","fFilmtype":"1000010100000000000","fYear":2016,"fCountry":12,"fKeyword":"一个钓鱼的故事","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87fe37ca1d108069af15.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adca774c36b070e69ec8e.jpg","fDirector":"Matt Birman","fPerformer":"Eddie McClintock, Jayne Heitmeyer, Jordyn Negri ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:20:23","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":2,"fMakecollect":13,"fPlayct":132,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":22,"fSourceurl":null,"fCountryname":"加拿大","fFilmtypename":"喜剧/剧情/奇幻","fImpression":"印象"},{"fId":"5930e4cd1c886e2dc0d45342","fName":"末世迷踪：下一代","fFilmtype":"0000000100000000000","fYear":2016,"fCountry":4,"fKeyword":"末世迷踪：下一代","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a88f137ca1d108069af17.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcc774c36b070e69ec90.jpg","fDirector":"Larry A. McLean","fPerformer":" Amber Frank, Mason Dye, Dylan Sprayberry","fShowtime":"2017-06-02","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-02 12:08:34","fShow":1,"fLookct":1,"fMakelookct":15,"fGoodct":2,"fMakegoodct":25,"fCollect":2,"fMakecollect":0,"fPlayct":17,"fMakepalyct":5,"fSharect":1,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"奇幻","fImpression":null},{"fId":"594c95065bc42d07a03f1fac","fName":"大婴儿","fFilmtype":"1100010000000000000","fYear":2015,"fCountry":4,"fKeyword":"大婴儿","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a887337ca1d108069af16.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adcb874c36b070e69ec8f.jpg","fDirector":"Stephen Langford","fPerformer":"Maureen McCormick, Andrew Lawrence, Ken Davitian","fShowtime":"2015-12-12","fScore":0.0,"fPricetagid":"1","fPricetagname":"2元电影","fIntime":"2017-06-23 12:43:35","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":1,"fMakecollect":13,"fPlayct":11,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":4,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情/剧情","fImpression":"印象"},{"fId":"594cacc75bc42d07a0aa541b","fName":"正义","fFilmtype":"1100000000000000000","fYear":2016,"fCountry":4,"fKeyword":"正义","fPhoto":"http://119.10.70.142:9080/Images/upload/videoPhoto/595a87a137ca1d108069af14.png","fPhotow":"http://101.201.122.79:8083/Images/upload/videoPhoto/596adc9d74c36b070e69ec8d.jpg","fDirector":"Richard Gabai","fPerformer":" Stephen Lang, Jackson Rathbone, Jamie-Lynn Sigler ","fShowtime":"2016-12-12","fScore":0.0,"fPricetagid":"0","fPricetagname":"免费电影","fIntime":"2017-06-23 14:24:45","fShow":1,"fLookct":0,"fMakelookct":11,"fGoodct":0,"fMakegoodct":12,"fCollect":0,"fMakecollect":13,"fPlayct":4,"fMakepalyct":15,"fSharect":0,"fMakesharect":null,"fBuyct":0,"fCommentct":0,"fSourceurl":null,"fCountryname":"美国","fFilmtypename":"喜剧/爱情","fImpression":"印象"}]},"allcount":0}
                        var videoList = data.result.list;
                        var dataCount=data.result.count;
                        if (videoList && videoList.length > 0) {
                            var _html = '';
                            $.each(videoList,function(index,item){
								_html+='<span class="sr-list">'+
                                '<span class="list-img"><img src="'+item.fPhoto+'"></span>'+
                                '<span class="list-info">'+
                                '<div class="info-title">'+item.fName+'</div>'+
                                '<div class="info-des">'+
                                  item.fKeyword+
                                '</div>'+
                                '<div class="play-btn" onclick="GoToVideoInfo(\''+item["fId"] +'\')"> 马上观看</div>'+
                                '</span>'+
                                '</span>';
                            });
                            if(filmObject.pno==1){
                                $('#ul_comment').html(_html);
                            }
                            else{
                                $('#ul_comment').append(_html);
                            }
                            if (dataCount>( filmObject.pno)* filmObject.pagesize){
                                $('#div_commentfoot').html('<span class="get-more-data"  style="cursor:pointer" onclick="loadMore()">点击加载更多...</span>');
                            }
                            else{
                                //over
                                $('#div_commentfoot').html('<span class="get-more-data" >没有数据了...</span>');
                            }

                        }
                        else{
                            $('#ul_comment').html('没有找到搜索的内容！');
                        }

                    }
                }
            });

        }
        function loadMore() {
            filmObject.pno++;
            LoadSearchVideos();
        }
	</script>
</body>
</html>